<?php

namespace addons\oil\validate;

use think\Validate;

class Order extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'id' => 'require',
        'store_id' => 'require',
        'fuel_id' => 'require',
        'gun_key' => 'require',
        'gun_title' => 'require',
        'amount' => 'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'id.require' => '缺少参数',
        // 创建订单
        'store_id.require' => '请选择油站',
        'fuel_id.require' => '请选择油品',
        'gun_key.require' => '请选择油枪',
        'gun_title.require' => '请选择油枪',
        'amount.require' => '输入金额',
    ];

    /**
     * 字段描述
     */
    protected $field = [
        
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'cancel' => ['id'],
        'share' => ['id'],
        'receive' => ['id'],
        'delete' => ['id'],
        'confirm' => ['id'],
        'pre' => ['store_id','fuel_id','gun_key','gun_title','amount'],
        'createOrder' => ['store_id','fuel_id','gun_key','gun_title','amount'],
    ];

}
